3.6.58 \(\int \frac {x^2 (A+B x^2)}{\sqrt {a+b x^2}} \, dx\) [558]

Optimal. Leaf size=89 \[ \frac {(4 A b-3 a B) x \sqrt {a+b x^2}}{8 b^2}+\frac {B x^3 \sqrt {a+b x^2}}{4 b}-\frac {a (4 A b-3 a B) \tanh ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right )}{8 b^{5/2}} \]

[Out]

-1/8*a*(4*A*b-3*B*a)*arctanh(x*b^(1/2)/(b*x^2+a)^(1/2))/b^(5/2)+1/8*(4*A*b-3*B*a)*x*(b*x^2+a)^(1/2)/b^2+1/4*B*
x^3*(b*x^2+a)^(1/2)/b

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 89, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {470, 327, 223, 212} \begin {gather*} -\frac {a (4 A b-3 a B) \tanh ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right )}{8 b^{5/2}}+\frac {x \sqrt {a+b x^2} (4 A b-3 a B)}{8 b^2}+\frac {B x^3 \sqrt {a+b x^2}}{4 b} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(x^2*(A + B*x^2))/Sqrt[a + b*x^2],x]

[Out]

((4*A*b - 3*a*B)*x*Sqrt[a + b*x^2])/(8*b^2) + (B*x^3*Sqrt[a + b*x^2])/(4*b) - (a*(4*A*b - 3*a*B)*ArcTanh[(Sqrt
[b]*x)/Sqrt[a + b*x^2]])/(8*b^(5/2))

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 223

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 327

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[c^(n - 1)*(c*x)^(m - n + 1)*((a + b*x^n
)^(p + 1)/(b*(m + n*p + 1))), x] - Dist[a*c^n*((m - n + 1)/(b*(m + n*p + 1))), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 470

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[d*(e*x)^(m +
 1)*((a + b*x^n)^(p + 1)/(b*e*(m + n*(p + 1) + 1))), x] - Dist[(a*d*(m + 1) - b*c*(m + n*(p + 1) + 1))/(b*(m +
 n*(p + 1) + 1)), Int[(e*x)^m*(a + b*x^n)^p, x], x] /; FreeQ[{a, b, c, d, e, m, n, p}, x] && NeQ[b*c - a*d, 0]
 && NeQ[m + n*(p + 1) + 1, 0]

Rubi steps

\begin {align*} \int \frac {x^2 \left (A+B x^2\right )}{\sqrt {a+b x^2}} \, dx &=\frac {B x^3 \sqrt {a+b x^2}}{4 b}-\frac {(-4 A b+3 a B) \int \frac {x^2}{\sqrt {a+b x^2}} \, dx}{4 b}\\ &=\frac {(4 A b-3 a B) x \sqrt {a+b x^2}}{8 b^2}+\frac {B x^3 \sqrt {a+b x^2}}{4 b}-\frac {(a (4 A b-3 a B)) \int \frac {1}{\sqrt {a+b x^2}} \, dx}{8 b^2}\\ &=\frac {(4 A b-3 a B) x \sqrt {a+b x^2}}{8 b^2}+\frac {B x^3 \sqrt {a+b x^2}}{4 b}-\frac {(a (4 A b-3 a B)) \text {Subst}\left (\int \frac {1}{1-b x^2} \, dx,x,\frac {x}{\sqrt {a+b x^2}}\right )}{8 b^2}\\ &=\frac {(4 A b-3 a B) x \sqrt {a+b x^2}}{8 b^2}+\frac {B x^3 \sqrt {a+b x^2}}{4 b}-\frac {a (4 A b-3 a B) \tanh ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right )}{8 b^{5/2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.10, size = 76, normalized size = 0.85 \begin {gather*} \frac {x \sqrt {a+b x^2} \left (4 A b-3 a B+2 b B x^2\right )}{8 b^2}-\frac {a (-4 A b+3 a B) \log \left (-\sqrt {b} x+\sqrt {a+b x^2}\right )}{8 b^{5/2}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(x^2*(A + B*x^2))/Sqrt[a + b*x^2],x]

[Out]

(x*Sqrt[a + b*x^2]*(4*A*b - 3*a*B + 2*b*B*x^2))/(8*b^2) - (a*(-4*A*b + 3*a*B)*Log[-(Sqrt[b]*x) + Sqrt[a + b*x^
2]])/(8*b^(5/2))

________________________________________________________________________________________

Maple [A]
time = 0.09, size = 106, normalized size = 1.19

method result size
risch \(\frac {x \left (2 b B \,x^{2}+4 A b -3 B a \right ) \sqrt {b \,x^{2}+a}}{8 b^{2}}-\frac {a \ln \left (x \sqrt {b}+\sqrt {b \,x^{2}+a}\right ) A}{2 b^{\frac {3}{2}}}+\frac {3 a^{2} \ln \left (x \sqrt {b}+\sqrt {b \,x^{2}+a}\right ) B}{8 b^{\frac {5}{2}}}\) \(81\)
default \(B \left (\frac {x^{3} \sqrt {b \,x^{2}+a}}{4 b}-\frac {3 a \left (\frac {x \sqrt {b \,x^{2}+a}}{2 b}-\frac {a \ln \left (x \sqrt {b}+\sqrt {b \,x^{2}+a}\right )}{2 b^{\frac {3}{2}}}\right )}{4 b}\right )+A \left (\frac {x \sqrt {b \,x^{2}+a}}{2 b}-\frac {a \ln \left (x \sqrt {b}+\sqrt {b \,x^{2}+a}\right )}{2 b^{\frac {3}{2}}}\right )\) \(106\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(B*x^2+A)/(b*x^2+a)^(1/2),x,method=_RETURNVERBOSE)

[Out]

B*(1/4*x^3/b*(b*x^2+a)^(1/2)-3/4*a/b*(1/2*x*(b*x^2+a)^(1/2)/b-1/2*a/b^(3/2)*ln(x*b^(1/2)+(b*x^2+a)^(1/2))))+A*
(1/2*x*(b*x^2+a)^(1/2)/b-1/2*a/b^(3/2)*ln(x*b^(1/2)+(b*x^2+a)^(1/2)))

________________________________________________________________________________________

Maxima [A]
time = 0.30, size = 86, normalized size = 0.97 \begin {gather*} \frac {\sqrt {b x^{2} + a} B x^{3}}{4 \, b} - \frac {3 \, \sqrt {b x^{2} + a} B a x}{8 \, b^{2}} + \frac {\sqrt {b x^{2} + a} A x}{2 \, b} + \frac {3 \, B a^{2} \operatorname {arsinh}\left (\frac {b x}{\sqrt {a b}}\right )}{8 \, b^{\frac {5}{2}}} - \frac {A a \operatorname {arsinh}\left (\frac {b x}{\sqrt {a b}}\right )}{2 \, b^{\frac {3}{2}}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(B*x^2+A)/(b*x^2+a)^(1/2),x, algorithm="maxima")

[Out]

1/4*sqrt(b*x^2 + a)*B*x^3/b - 3/8*sqrt(b*x^2 + a)*B*a*x/b^2 + 1/2*sqrt(b*x^2 + a)*A*x/b + 3/8*B*a^2*arcsinh(b*
x/sqrt(a*b))/b^(5/2) - 1/2*A*a*arcsinh(b*x/sqrt(a*b))/b^(3/2)

________________________________________________________________________________________

Fricas [A]
time = 1.12, size = 162, normalized size = 1.82 \begin {gather*} \left [-\frac {{\left (3 \, B a^{2} - 4 \, A a b\right )} \sqrt {b} \log \left (-2 \, b x^{2} + 2 \, \sqrt {b x^{2} + a} \sqrt {b} x - a\right ) - 2 \, {\left (2 \, B b^{2} x^{3} - {\left (3 \, B a b - 4 \, A b^{2}\right )} x\right )} \sqrt {b x^{2} + a}}{16 \, b^{3}}, -\frac {{\left (3 \, B a^{2} - 4 \, A a b\right )} \sqrt {-b} \arctan \left (\frac {\sqrt {-b} x}{\sqrt {b x^{2} + a}}\right ) - {\left (2 \, B b^{2} x^{3} - {\left (3 \, B a b - 4 \, A b^{2}\right )} x\right )} \sqrt {b x^{2} + a}}{8 \, b^{3}}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(B*x^2+A)/(b*x^2+a)^(1/2),x, algorithm="fricas")

[Out]

[-1/16*((3*B*a^2 - 4*A*a*b)*sqrt(b)*log(-2*b*x^2 + 2*sqrt(b*x^2 + a)*sqrt(b)*x - a) - 2*(2*B*b^2*x^3 - (3*B*a*
b - 4*A*b^2)*x)*sqrt(b*x^2 + a))/b^3, -1/8*((3*B*a^2 - 4*A*a*b)*sqrt(-b)*arctan(sqrt(-b)*x/sqrt(b*x^2 + a)) -
(2*B*b^2*x^3 - (3*B*a*b - 4*A*b^2)*x)*sqrt(b*x^2 + a))/b^3]

________________________________________________________________________________________

Sympy [A]
time = 4.21, size = 150, normalized size = 1.69 \begin {gather*} \frac {A \sqrt {a} x \sqrt {1 + \frac {b x^{2}}{a}}}{2 b} - \frac {A a \operatorname {asinh}{\left (\frac {\sqrt {b} x}{\sqrt {a}} \right )}}{2 b^{\frac {3}{2}}} - \frac {3 B a^{\frac {3}{2}} x}{8 b^{2} \sqrt {1 + \frac {b x^{2}}{a}}} - \frac {B \sqrt {a} x^{3}}{8 b \sqrt {1 + \frac {b x^{2}}{a}}} + \frac {3 B a^{2} \operatorname {asinh}{\left (\frac {\sqrt {b} x}{\sqrt {a}} \right )}}{8 b^{\frac {5}{2}}} + \frac {B x^{5}}{4 \sqrt {a} \sqrt {1 + \frac {b x^{2}}{a}}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*(B*x**2+A)/(b*x**2+a)**(1/2),x)

[Out]

A*sqrt(a)*x*sqrt(1 + b*x**2/a)/(2*b) - A*a*asinh(sqrt(b)*x/sqrt(a))/(2*b**(3/2)) - 3*B*a**(3/2)*x/(8*b**2*sqrt
(1 + b*x**2/a)) - B*sqrt(a)*x**3/(8*b*sqrt(1 + b*x**2/a)) + 3*B*a**2*asinh(sqrt(b)*x/sqrt(a))/(8*b**(5/2)) + B
*x**5/(4*sqrt(a)*sqrt(1 + b*x**2/a))

________________________________________________________________________________________

Giac [A]
time = 0.93, size = 75, normalized size = 0.84 \begin {gather*} \frac {1}{8} \, \sqrt {b x^{2} + a} {\left (\frac {2 \, B x^{2}}{b} - \frac {3 \, B a b - 4 \, A b^{2}}{b^{3}}\right )} x - \frac {{\left (3 \, B a^{2} - 4 \, A a b\right )} \log \left ({\left | -\sqrt {b} x + \sqrt {b x^{2} + a} \right |}\right )}{8 \, b^{\frac {5}{2}}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(B*x^2+A)/(b*x^2+a)^(1/2),x, algorithm="giac")

[Out]

1/8*sqrt(b*x^2 + a)*(2*B*x^2/b - (3*B*a*b - 4*A*b^2)/b^3)*x - 1/8*(3*B*a^2 - 4*A*a*b)*log(abs(-sqrt(b)*x + sqr
t(b*x^2 + a)))/b^(5/2)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {x^2\,\left (B\,x^2+A\right )}{\sqrt {b\,x^2+a}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^2*(A + B*x^2))/(a + b*x^2)^(1/2),x)

[Out]

int((x^2*(A + B*x^2))/(a + b*x^2)^(1/2), x)

________________________________________________________________________________________